-- GENERATED SPELL FOR [Tempest Falconer] --


function spell0_20037(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(37318,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20037', 0, 1)
end

function spell1_20037(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(37154,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20037', 533, 1)
end

function spell2_20037(pUnit, Event) --@Knockback,Self--
pUnit:FullCastSpellOnTarget(37317,pUnit)
pUnit:RegisterEvent('Sorts_20037', 640, 1)
end

function spell3_20037(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(39079,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20037', 604, 1)
end

function Sorts_20037(pUnit, Event)
local choix_sorts_20037 = math.random(0, 3)
if choix_sorts_20037 == 0 then
pUnit:RegisterEvent('spell0_20037', 1, 1)
end
if choix_sorts_20037 == 1 then
pUnit:RegisterEvent('spell1_20037', 1, 1)
end
if choix_sorts_20037 == 2 then
pUnit:RegisterEvent('spell2_20037', 1, 1)
end
if choix_sorts_20037 == 3 then
pUnit:RegisterEvent('spell3_20037', 1, 1)
end
end

function mob20037_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20037', math.random(1500, 3000), 1)
end

function mob20037_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20037_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20037_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20037, 1, 'mob20037_Action')
RegisterUnitEvent(20037, 2, 'mob20037_Leave')
RegisterUnitEvent(20037, 3, 'mob20037_Kill')
RegisterUnitEvent(20037, 4, 'mob20037_Die')
